package com.example.teemoproject;

import android.graphics.Bitmap;
import android.graphics.Canvas;

public class DeadPlayer extends SpriteAnimation {

	int land;
	protected Bitmap dieMotionmap;

	long beginTime;

	public DeadPlayer(Bitmap bitmap, int framePerSecond, int frameCount) {
		super(bitmap, framePerSecond, frameCount);
		initDeadPlayer();
	}

	public DeadPlayer(int resourceId, int framePerSecond, int frameCount) {
		super(resourceId, framePerSecond, frameCount);
		initDeadPlayer();
	}

	private void initDeadPlayer() {

		int width = AppHelper.getInstance().getViewWidth();
		int height = AppHelper.getInstance().getViewHeight();

		int x = (width - spriteWidth) / 5;
		int y = height - spriteHeight - (height / 12);
		land = height - spriteHeight - (height / 12);

		setPosition(x, y);

		dieMotionmap = AppHelper.getInstance().getBitmap(R.drawable.die);

	}

	@Override
	public void update(long time) {
		// TODO Auto-generated method stub
		super.update(time);

		if (time - beginTime > 2500)
			destroyed = true;
	}

	@Override
	public void doDraw(Canvas canvas) {
		// TODO Auto-generated method stub
		super.doDraw(canvas);
	}

}
